package cn.wangqi.personal.service.impl;

import cn.wangqi.personal.dao.UserDao;
import cn.wangqi.personal.domain.User;
import cn.wangqi.personal.service.IUserService;
import cn.wangqi.personal.util.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by admin on 2017/9/6.
 */
@Service
public class UserService implements IUserService{

    @Resource
    public UserDao userDao;

    @Override
    public List<User> findUserList(Page page, User user) {
        return userDao.findUserList(page,user);
    }

    @Override
    public int countUserList(User user) {
        return userDao.countUserList(user);
    }

    @Override
    public User findUserByPhone(String phone) {
        return userDao.findUserByPhone(phone);
    }

    @Override
    public void saveUser(User user) {
        userDao.saveUser(user);
    }

}
